/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package flightlifter;

import java.util.Vector;

/**
 *
 * @author Matt
 */
public class Bullet extends Point{

    public Bullet(PVector pos, PVector lastPos, PVector align) {

        this.pos = pos;
        this.lastPos = lastPos;
        PVector dir = PVector.sub(pos,align);
        float vel = PVector.sub(pos,lastPos).mag();
        dir.normalize();

        dir.mult(20.f + 1.f*(float)Math.random() + vel);
        lastPos.sub(dir);
    }

}
